Method and apparatus for automatic frequency correction with a frequency error signal generated by block correlation of baseband samples with a known code sequence

ABSTRACT

The present invention is related to a method and apparatus for automatic frequency correction of a local oscillator. The apparatus receives a carrier signal. The carrier signal includes a code sequence known to the apparatus. The apparatus downconverts the carrier signal to a baseband signal using the local oscillator. The apparatus performs a block correlation of the samples of the baseband signal with the known code sequence to generate a frequency error signal. The frequency error signal is fed back to the local oscillator to correct the frequency error.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.11/382,380, filed May 9, 2006, now U.S. Pat. No. 7,299,023, which is acontinuation of U.S. patent application Ser. No. 10/977,053, filed Oct.29, 2004, now U.S. Pat. No. 7,058,378, which claims the benefit of U.S.provisional application No. 60/523,051 filed Nov. 18, 2003, which areincorporated by reference as if fully set forth.

FIELD OF INVENTION

The present invention is related to wireless communications. Moreparticularly, the present invention is related to a method and apparatusfor automatic frequency correction (AFC).

BACKGROUND

In a wireless communication system, a transmitter modulates a basebandsignal with a high frequency carrier to transmit to a receiver. Themodulated signal is received and demodulated at the receiver. Formodulation and demodulation, both a transmitter and a receiver include alocal oscillator for generating the same frequency carrier signal. Toeffectively demodulate the modulated signal, the frequency of the localoscillator at the receiver should be same as that of the transmitter.Therefore, it is important to remove phase errors between thetransmitter and the receiver local oscillators.

Although the nominal frequencies of a wireless transmit/receive unit(WTRU) and a base station local oscillator are the same, they aredifferent in practice. There are two main reasons for the difference.The first reason is an initial frequency error due to manufacturingtolerances of the oscillator. The second reason is a drift of theoscillator frequency over time. This happens due to various reasons suchas temperature effects and aging. This cumulatively results in differentoscillator frequencies between a WTRU and a base station.

The frequency difference of local oscillators between a WTRU and a basestation causes system degradation. For example, in a UniversalTerrestrial Radio Access/Time Division Duplex (UTRA/TDD) system, thefrequency difference between a base station local oscillator and a WTRUlocal oscillator can be as large as ±3 ppm. With a transmitter andreceiver carrier frequency of about 2 GHz, 3 ppm corresponds to afrequency error of 6,000 Hz. Since the local oscillator is synthesizedfrom the same local oscillator that is used for sampling, sampling atthe receiver can drift as much as 1 chip every 8.7 frames for a TDDsystem.

SUMMARY

The present invention is related to a method and apparatus for AFC of alocal oscillator. The method of the present invention utilizesdifferences in successive phase estimates to maintain the frequency ofthe WTRU local oscillator within a desired or predetermined rangerelative to a base station local oscillator. A WTRU receives a carriersignal from a base station. The carrier signal includes a code sequenceknown to the WTRU. The WTRU downconverts the carrier signal into abaseband signal using the local oscillator. The WTRU performs a blockcorrelation of the samples of the baseband signal with the known codesequence to generate a frequency error signal. The frequency errorsignal is fed back to the local oscillator to correct the frequencyerror.

BRIEF DESCRIPTION OF THE DRAWINGS

A more detailed understanding of the invention may be obtained from thefollowing description of preferred embodiments, provided by way ofexample and to be understood in conjunction with the accompanyingdrawings in which:

FIG. 1 is a block diagram of a process including inputs and outputs foran automatic frequency correction process operating in accordance with apreferred embodiment of the present invention;

FIG. 2 is a block diagram of an apparatus for implementing automaticfrequency correction in accordance with a preferred embodiment of thepresent invention;

FIG. 3 is a block diagram of a frequency estimation block utilized in anapparatus of FIG. 2;

FIG. 4 is a diagram of block correlators utilized in the frequencyestimation block of FIG. 3;

FIG. 5 is a block diagram of an exemplary first block correlation;

FIG. 6 is a block diagram of a conjugate product and sum unit utilizedin the frequency estimation block of FIG. 3;

FIG. 7 is a block diagram of an integrator for integrating the estimatedfrequency error;

FIG. 8 is a flow diagram of a process for automatic frequency correctionin accordance with the present invention; and

FIG. 9 is a block diagram of another embodiment of a frequencyestimation block utilized in an apparatus of FIG. 2.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The present invention will be described with reference to the drawingfigures wherein like numerals represent like elements throughout.

The features of the present invention may be incorporated into anintegrated circuit (IC) or be configured in a circuit comprising amultitude of interconnecting components.

Hereafter, the terminology “WTRU” includes, but is not limited to, auser equipment, a mobile station, a fixed or mobile subscriber unit, apager, or any other type of device capable of operating in a wirelessenvironment. When referred to hereafter, the terminology “base station”includes, but is not limited to, a Node-B, a site controller, an accesspoint or any other type of interfacing device in a wireless environment.

Hereinafter, for simplicity, the present invention will be describedwith reference to a TDD system. However, it would be understood by aperson skilled in the art that the teachings of the present inventionare applicable to a general code division multiple access (CDMA)communication system, including frequency division duplex (FDD), timedivision synchronous CDMA (TDSCDMA), and CDMA 2000, or any other CDMAsystem.

FIG. 1 is a block diagram of a process 100 including inputs and outputsfor an AFC processor 102 operating in accordance with a preferredembodiment of the present invention. The AFC processor 102 in accordancewith the present invention utilizes several inputs, including a sampledreceived baseband signal, (preferably two times (2×) over-sampled), alocation of a code sequence, (preferably in the form of a primary commoncontrol physical channel (P-CCPCH) midamble position), a cell parameterin the form of a basic midamble code number, an odd/even frameindicator, an RF carrier frequency, and an initial voltage controlledoscillator (VCO) digital-to-analog converter (DAC) control voltage.Optionally, the initial VCO DAC control voltage may be based upon a userdefined value or a previously stored value. The outputs 104 of the AFCprocessor 102 include any of: (a) a control voltage for the VCO, (b) anestimated frequency error, and (c) an indicator of convergence.

The AFC is performed after completion of an initial cell searchprocedure. No channel estimation or equalization is required for the AFCto execute. The present invention will be explained hereinafter withreference to a midamble code in a P-CCPCH. However, it should beunderstood that any other pilot sequence can be used instead of P-CCPCH.The only required information for AFC is the location of a midamble of aP-CCPCH, which is provided after the initial cell search procedure.Initially, the AFC process uses the midamble of the P-CCPCH. Once adedicated channel (DCH) is established, the AFC process may further usea midamble contained in the DCH.

FIG. 2 is a block diagram of an apparatus 200 for implementing AFC inaccordance with a preferred embodiment of the present invention. Theapparatus 200 comprises a VCO 202, a mixer 204, an analog-to-digitalconverter (ADC) 206, a frequency estimation block 208, a cell searchingblock 210, a loop filter 212, and a DAC 214. As shown in FIG. 2, thesignal generated by the VCO 202 may also be used for a transmit processfor mixing transmit data converted by a DAC 215, although this is notrequired.

A carrier signal includes a known code sequence, preferably a midamblecode, and the known code sequence is used for estimating frequency errorof the local oscillator. A received carrier signal is mixed by the mixer204 with a signal generated by the VCO 202 to be converted to a basebandsignal. The baseband signal is converted to a digital signal by the ADC206. The ADC 206 over-samples the baseband signal, preferably at 2× thechip rate. The digital samples are input to the frequency estimationblock 208 and the cell searching block 210.

The cell searching block 210 performs an initial cell searchingprocedure using any known method. After the cell searching procedure isperformed, the cell searching block 210 outputs the location of a firstsignificant path of the midamble code of a P-CCPCH. The 2× over-sampledreceived signal and the midamble position of the first significant pathare input into the frequency estimation block 208. The frequencyestimation block 208 generates a frequency error signal, which will beexplained in detail hereinafter. The frequency error signal generated bythe frequency estimation block 208 enters into the loop filter 212 thatgenerates a correction signal for the VCO 202. This correction signaldrives the measured frequency error to zero in a steady state. Thecorrection signal may or may not be digital. If the correction signal isdigital, it is converted to an analog signal by the DAC 214 before beingapplied to the VCO 202.

FIG. 3 is a block diagram of a frequency estimation block 208 utilizedin the apparatus of FIG. 2. It should be understood that theconfiguration illustrated in FIG. 3 is provided only as an example, andany other types of architecture may be used in frequency estimation.Pursuant to a preferred embodiment of the present invention, thefrequency estimation block 208 comprises at least one block correlatorbank 220, at least one conjugate product and sum unit 230, and an anglecalculation unit 250. The block correlator bank 220 performs correlationof the samples with the midamble to generate correlation results. Theblock correlator bank 220 comprises a plurality of block correlators aswill be explained in detail hereinafter. The conjugate product and sumunit 230 receives the correlation results and generates an estimate ofthe phase change from one block correlator to the next block correlatorin the block correlator bank 220. The angle calculation unit 250generates a frequency estimate from the output of the conjugate productand sum unit 230. The frequency estimator 208 may further comprise anaccumulator 240 for accumulating the output of the conjugate product andsum unit 230 over a predetermined time, a multipath detection unit 241and a multipath combiner 248 for detecting and combining multipathcomponents.

The frequency estimation block 208 may comprise more than one blockcorrelator bank 220 and more than one conjugate product and sum unit 230to process additional midambles. For example, as shown in FIG. 9, twomidambles, m₁, and m₂ (j=0,1) may be used. Thus, in this embodiment, thefrequency estimation block 208 comprises two block correlator banks220′, 220″ and two conjugate product and sum units 230′, 230″. A firstblock correlator bank 220′ and conjugate product and sum unit 230′process the first midamble, m₁, and the second block correlator bank220″ and conjugate product and sum unit 230″ process the secondmidamble, m₂. This allows for diversity gains when space code transmitdiversity (SCTD) is employed.

FIG. 4 is a block diagram of an example configuration of the blockcorrelator bank 220 of FIG. 3 using sliding window block correlation.The block correlator bank 220 comprises a plurality of block correlators220 a-220 d. Each block correlator 220 a-220 d performs correlation ofthe received baseband samples with the midamble to generate acorrelation result. The size of the block, and hence number of blocks,is chosen to prevent excessive correlation loss before the AFC hascorrected the initial error, but the specific size shown in the figureis not required.

As an example, if the AFC procedure processes a midamble of a P-CCPCHtransmitted in a burst type 1, the transmission is 2× over-sampled, andthe searching window includes 10 leading chips (20 samples), 49 laggingchips (98 samples), and 512 midamble chips (1024 samples), the totalnumber of samples required for the sliding window is 1142 (r₀-r₁₁₄₁).The leading samples provide margin for any undetected paths. The laggingsamples provide margin for the maximum expected multipath spread. Ateach lag, four (4) correlations at each block correlator 220 a-220 d areperformed. At each lag, 128 samples are input into each of four blockcorrelators 220 a-220 d. For example, the first 128 even samples (r₀,r₂, . . . r₂₅₄) are input to the first block correlator 220 a, the next128 even samples (r₂₅₆, r₂₅₈, . . . r₅₁₀) are input to the second blockcorrelator 220 b, the next 128 even samples (r₅₁₂, r₅₁₄, . . . r₇₆₆) areinput to the third block correlator 220 c, and the last 128 even samples(r₇₆₈, r₇₇₀, . . . r₁₀₂₂) are input to the fourth block correlator 220d. Each block correlator performs a correlation with a different portionof midamble code. In the foregoing example that 512 bits of midamblecode and four (4) block correlators are used, each block correlatorperforms a correlation with 128 bits of midamble. The first blockcorrelator 220 a uses the first 128 bits of midamble, the second blockcorrelator 220 b uses the second 128 bits, the third and the fourthblock correlators 220 c, 220 d use the third and the fourth 128 bits,respectively. Each block correlator 220 a-220 d generates a correlationresult, R_(0,i,j), R_(1,i,j), R_(2,i,j), and R_(3,i,j), respectively.

FIG. 5 is a block diagram of the first block correlator 220 a in theblock correlator bank 220. The first block correlator 220 a receives 128samples and performs a correlation of the samples with the first 128bits of midamble, and produces R_(0,i,j). In general, the output fromthe k'th block correlator at lag i is defined by:

$\begin{matrix}{{R_{k,i,j} = {\sum\limits_{n = 0}^{B - 1}{r_{i + {2{kB}} + {2n}}m_{j,{{kB} + n}}^{*}}}},} & {{Equation}\mspace{20mu}(1)}\end{matrix}$where, for the foregoing example, 0≦i≦118, 0≦k≦3, B=128, and j, (0≦j≦1),corresponds to the midamble shift used for the correlation. The resultsof the sliding window correlation block (R_(0,i,j), R_(1,i,j),R_(2,i,j), and R_(3,i,j)) are passed to the conjugate product and sumunit 230.

FIG. 6 is a block diagram of a conjugate product and sum unit 230utilized in the frequency estimation block 208 of FIG. 3. The correlatoroutput is a complex number that represents the centroid of the receivedsamples with the midamble modulation removed. The conjugate product andsum unit 230 generates an estimate of the phase change from one blockcorrelator to the next block correlator. This is accomplished bycomputing the conjugate product of successive correlator outputs.Conjugate of output R_(0,i,j)* from the first block correlator 220 a ismultiplied to an output R_(1,i,j) of a second block correlator 220 b,conjugate of output R_(1,i,j)* of the second block correlator 220 b ismultiplied to an output R_(2,i,j) of a third block correlator 220 c, andconjugate of output R_(2,i,j)* of the third block correlator 220 c ismultiplied to an output R_(3,i,j) of a fourth block correlator 220 d.Each output from a conjugate product operation is a complex vector withangle approximating the phase change from the center of one correlationto the next. The three conjugate products for each midamble, m₁ and m₂,are then summed together to produce a lower variance estimate of thephase change from one block correlator to the next. Conjugate productsassociated with m₁ are summed together and stored in D(i,0), andconjugate products associated with m₂ are summed together and stored inD(i,1). The equation defining the output of the conjugate product andsum block is:

$\begin{matrix}{{D\left( {i,j} \right)} = {\sum\limits_{k = 1}^{3}{R_{k,i,j}R_{{k - 1},i,j}^{*}}}} & {{Equation}\mspace{20mu}(2)}\end{matrix}$

The frequency estimation block 208 preferably comprises an accumulator240. The accumulator 240 accumulates the output of the conjugate productand sum unit 230 over N midambles. The resulting accumulated complexnumbers are defined as:

$\begin{matrix}{{\overset{\_}{D}\left( {i,j} \right)} = {\sum\limits_{N\mspace{11mu}{Midambles}}{D\left( {j,i} \right)}}} & {{Equation}\mspace{20mu}(3)}\end{matrix}$

The accumulation time, N, is initially set to 2 and is subsequentlydetermined based on the most recent estimate of the absolute value of afrequency error. Table 1 provides exemplary values of N as a function ofthe frequency error. The values chosen for N guarantee that less thanone quarter chip movement can occur between frequency updates, in orderto prevent paths from crossing into adjacent samples.

TABLE 1 Absolute frequency error (Hz) Number of midambles (N) (4000, ∞)2 (2000, 4000) 4 (1000, 2000) 6 (100, 1000) 12 (0, 100) 30

Referring back to FIG. 3, the frequency estimation block 208 may furthercomprise a multipath detection unit 241 and a multipath combiner 248.The multipath detection unit 241 comprises a magnitude calculation unit242, a searching unit 244, and a threshold calculator 246. In order tocombine multipath components, after N midambles have been processedthrough the sliding window block correlators 220, the multipathdetection unit 241 searches to find several, (for example six (6)),accumulated value D(i,j) with the largest magnitudes. The accumulatedvalues, D(i,j), are input to the magnitude calculation unit 242 and thesearching unit 244. The magnitude calculation unit 242 calculates themagnitude of each accumulated value, D(i,j), and outputs the magnitudeof each accumulated value, D(i,j), to the searching unit 244.

The searching unit 244 locates six (6) of the largest absolute values,(D0 (largest) through D5). The following equations precisely define therelationship between the accumulated values, D(i,j), and the six (6)resolved paths:

$\begin{matrix}{{\left( {i_{0},j_{0}} \right) = {\underset{({i,j})}{{Arg}\;{Max}}\left( {{\overset{\_}{D}\left( {i,j} \right)}} \right)}};} & {{Equation}\mspace{20mu}(4)}\end{matrix}$D0= D (i ₀ ,j ₀);  Equation (5)

$\begin{matrix}{{\left( {i_{1},j_{1}} \right) = {\underset{{({i,j})} \neq {({i_{0},j_{0}})}}{{Arg}\;{Max}}\left( {{\overset{\_}{D}\left( {i,j} \right)}} \right)}};} & {{Equation}\mspace{20mu}(6)}\end{matrix}$D1= D (i ₁ ,j);  Equation (7)

$\begin{matrix}{{\left( {i_{n},j_{n}} \right) = {\underset{\underset{\underset{{({i,j})} \neq {({i_{n - 1},j_{n - 1}})}}{{{({i,j})} \neq {({i_{1},j_{1}})}},\ldots,}}{{({i,j})} \neq {({i_{0},j_{0}})}}}{{Arg}\;{Max}}\left( {{\overset{\_}{D}\left( {i,j} \right)}} \right)}};{and}} & {{Equation}\mspace{20mu}(8)}\end{matrix}$Dn= D (i _(n) ,j _(n));  Equation (9)

where i_(n) and j_(n) are the lag and midamble shift, respectively,associated with multi-path component Dn, and 0≦n≦5. A total of six (6)paths are combined in the foregoing example, which corresponds to twice(for transmit diversity) the expected maximum number of significantmulti-paths, which is three (3). It should be noted that other valuesmay be used instead of six (6).

The threshold calculator 246 determines a detection threshold based onthe magnitude of the peak (D0), and compares it to D1-D5. D1-D5 areconsidered significant if they are greater than β|D0| in magnitude.Otherwise they are rejected as noise:

$\begin{matrix}{{Dn}^{\prime} = \left\{ \begin{matrix}{{Dn},} & {{{Dn}} \geq {\beta{{D\; 0}}}} \\{0,} & {Otherwise}\end{matrix} \right.} & {{Equation}\mspace{20mu}(10)}\end{matrix}$The detection threshold coefficient, β, is a configurable parameter.

If the magnitudes of D1-D5 exceed the detection threshold, they aredeemed sufficiently large to be included in the frequency estimationcomputation. After D1-D5 are compared to the detection threshold, themultipath combiner 248 combines the surviving multipath components intoa single complex vector whose angle is an estimate of the phase changeof the carrier offset over one correlator block time period. Thiscomplex resultant is given by:

$\begin{matrix}{D = {{D\; 0} + {\sum\limits_{n = 1}^{5}{Dn}^{\prime}}}} & {{Equation}\mspace{20mu}(11)}\end{matrix}$

The angle calculation unit 250 determines a frequency estimate of thecomplex resultant. A trigonometric calculation can be employed incalculating the frequency estimate. However, the frequency estimate ispreferably computed using two approximations. In order to extract theangle information from the multipath combiner 248 output, the complexvector is scaled to have unit magnitude and an approximation of thecomplex absolute value function is utilized in a magnitude calculationunit 252 and a complex error normalization unit 254. The complexabsolute value approximation is as follows:Abs _(approx){z}=Max(|Re{z}|,|Im{z}|)+½Min(|Re{z}|,|Im{z}|)  Equation(12)It is necessary to make use of a small angle approximation for the angleof a complex unit vector. The approximation is as follows:Im{z}≈Arg(z)=θ,if θ<<1, and |z|=1.  Equation (13)Therefore, the equation that relates the estimated angle, θ, with thecomplex output of the multipath combiner 248, D, is:

$\begin{matrix}{\theta = {{Im}\left\{ \frac{D}{{Abs}_{approx}\left\{ D \right\}} \right\}}} & {{Equation}\mspace{20mu}(14)}\end{matrix}$

The definition of frequency is the rate of change of phase with respectto time. The time interval of the differential phase estimate is fixedat BT_(c). Therefore estimated frequency error, ε, is simply a scaledversion of θ:ε=αθ  (Equation 15)

Pursuant to a fixed-point implementation of AFC, the desired units ofthe estimated frequency error must be consistent with the VCO DACregister. As an example, where the VCO DAC has 10-bits of resolution anda dynamic range of ±7.275 ppm (≈29.1 kHz) which implies the LSB, δ,represents a change of about 28 Hz. The constant α is provided by:

$\begin{matrix}{{\alpha = \frac{1}{4\delta\;{BT}_{c}}};} & {{Equation}\mspace{20mu}(16)}\end{matrix}$where,δ=f _(c)·7.275×10⁻⁶.  Equation (17)The LSB δ, and therefore α, are dependant upon the RF frequency to whichthe radio is tuned. It is, therefore, necessary for the AFC algorithm tobe provided the RF carrier frequency in order to appropriately scale theestimated frequency error.

FIG. 7 is a block diagram of an illustrative integrator for integratingthe estimated frequency error generated by the frequency estimator. Theloop filter 212 takes the estimated frequency error ε as an input andthe estimated frequency error is scaled by λ 262 and performs anintegration operation through a delay and feedback unit 264 in order toobtain the VCO DAC register, v:v(t)=v(t−1)+λe(t).  Equation (18)The integration is performed only when the error ε is dumped from theprevious block. Therefore the value of v changes after N midambles areprocessed.

Upon initialization of AFC, the convergence indicator 104 is cleared.When an estimate of frequency error is smaller than a predeterminedvalue, (for example 100 Hz in absolute value), the convergence indicatoris set. If, after convergence, an estimated frequency error is computedthat is larger than a predetermined value, for example 1 kHz in absolutevalue, the convergence indicator is cleared which indicates loss offrequency synchronization.

FIG. 8 is a flow diagram of a process 300 for AFC in accordance with thepresent invention. A WTRU receives a carrier signal (step 302). Thecarrier signal includes a known code sequence, for example a midamblecode. The WTRU downconverts the carrier signal into a baseband signalusing a local oscillator (step 304). The WTRU performs sampling of thebaseband signal preferable at 2× the chip rate (step 306). The samplesare input into a plurality of block correlators to generate a pluralityof correlation results (step 308). Correlation results of each blockcorrelator are multiplied and summed in conjugate sense to generate asingle conjugate product and sum (step 310). The conjugate product andsum are accumulated over N midambles. If N midambles are notaccumulated, the process returns to step 302 to receive another carriersignals (step 312).

If it is determined that N midambles are accumulated at step 312,multipath components are detected and combined together (step 314). Ifit is determined that N midamble are not yet accumulated, the process300 returns to step 302. In detecting the multipath components, severallargest accumulated products are selected and compared to a detectionthreshold. The detection threshold may be set in accordance with thelargest accumulated conjugate product and sum. An angle value, which isa frequency estimate, is calculated from the combined conjugate productand sum (step 316). In calculating the angle value, an approximationmethod may be utilized. A frequency error signal is generated from theangle value (step 318), and the frequency error signal is feed back tothe local oscillator to correct the frequency error (step 320).

Although the features and elements of the present invention aredescribed in the preferred embodiments in particular combinations, eachfeature or element can be used alone without the other features andelements of the preferred embodiments or in various combinations with orwithout other features and elements of the present invention.

1. A method for automatically correcting a frequency error of a localoscillator in a receiver, the method comprising: receiving signals froma transmitter, each signal including a sequence known to the receiver;sampling the signals to generate multiple sets of samples; performing acorrelation of each set of the samples and the sequence with a pluralityof block correlators to generate a plurality of correlation values, eachof the block correlators performing a correlation of a portion of thesamples and a corresponding portion of the code sequence; generating aconjugate product and sum of the plurality of correlation values foreach set of samples by multiplying correlation values generated byconsecutive block correlators in a conjugate sense to generate aplurality of conjugate products and summing the conjugate products;accumulating the conjugate product and sums; computing an angle value ofthe accumulated conjugate product and sum; computing a frequency errorestimate based on the angle value; generating a correction signal basedon the frequency error estimate; and applying the correction signal tothe local oscillator to correct a frequency error, wherein the conjugateproduct and sum is accumulated over N sets of samples and the number Nis adjusted in accordance with the frequency error estimate.
 2. Themethod of claim 1 further comprising: detecting multipath components,the conjugate product and sum being generated for each multipathcomponent; and combining the conjugate product and sum for the multipathcomponents, wherein the angle value is computed based on the combinedconjugate product and sum.
 3. The method of claim 2 wherein themultipath components are detected by comparing a magnitude of each ofthe conjugate product and sums to a threshold.
 4. The method of claim 3wherein a predetermined number of largest conjugate product and sums areselected as the multipath components.
 5. The method of claim 3 whereinthe threshold is determined based on a peak magnitude among the selectedconjugate product and sums.
 6. The method of claim 1 wherein the signalis sampled at twice the chip rate.
 7. The method of claim 1 wherein theangle value is computed using a complex number magnitude approximationand complex number small angle approximation.
 8. The method of claim 1wherein the sequence is a midamble sequence.
 9. The method of claim 8wherein the midamble sequence is a primary common control physicalchannel midamble sequence.
 10. The method of claim 9 wherein themidamble sequence is a dedicated channel (DCH) midamble sequence. 11.The method of claim 8 wherein two midamble sequences are simultaneoustransmitted for transmit diversity, whereby the frequency error estimateis computed using the two midamble sequences.
 12. A wirelesstransmit/receive unit (WTRU) for automatically correcting a frequencyerror of a local oscillator in a receiver, the WTRU comprising: areceiver for receiving signals from a transmitter, each signal includinga sequence known to the receiver, the receiver including a localoscillator; a sampling unit for sampling the signals to generatemultiple sets of samples; a plurality of block correlators forperforming a correlation of each set of the samples and the sequence togenerate a plurality of correlation values, each of the blockcorrelators performing a correlation of a portion of the samples and acorresponding portion of the code sequence; a conjugate product and sumunit for generating a conjugate product and sum of the plurality ofcorrelation values for each set of samples by multiplying correlationvalues generated by consecutive block correlators in a conjugate senseto generate a plurality of conjugate products and summing the conjugateproducts; an accumulator for accumulating the conjugate product and sumover N sets of samples; and an angle extraction unit for computing anangle value of the accumulated conjugate product and sum and computing afrequency error estimate based on the angle value, wherein a correctionsignal is generated based on the frequency error estimate and thecorrection signal is applied to the local oscillator to correct afrequency error, and N is adjusted in accordance with the frequencyerror estimate.
 13. The WTRU of claim 12 further comprising: a multipathdetection unit for detecting multipath components, the conjugate productand sum being generated for each multipath component and combining theconjugate product and sum for the multipath components, wherein theangle value is computed based on the combined conjugate product and sum.14. The WTRU of claim 13 wherein the multipath components are detectedby comparing a magnitude of each of the conjugate product and sums to athreshold.
 15. The WTRU of claim 14 wherein a predetermined number oflargest conjugate product and sums are selected as the multipathcomponents.
 16. The WTRU of claim 14 wherein the threshold is determinedbased on a peak magnitude among the selected conjugate product and sums.17. The WTRU of claim 12 wherein the signal is sampled at twice the chiprate.
 18. The WTRU of claim 12 wherein the angle value is computed usinga complex number magnitude approximation and complex number small angleapproximation.
 19. The WTRU of claim 12 wherein the sequence is amidamble sequence.
 20. The WTRU of claim 19 wherein the midamblesequence is a primary common control physical channel midamble sequence.21. The WTRU of claim 20 wherein the midamble sequence is a dedicatedchannel (DCH) midamble sequence.